package com.person.jiaiplan.contant;

import lombok.Getter;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

@Getter
public enum OperatorTypeEnum {
    work(1, "工作"),
    life(2, "生活"),
    study(3, "学习");

    public static final String SELECT_TITLE = "OperatorTypeEnum";
    public static final Map<String, Map<String, String>> map = new HashMap<>();

    static {
        Map<String, String> operatorTypeEnum = new HashMap<>();
        Arrays.stream(OperatorTypeEnum.values()).forEach(item -> {
            operatorTypeEnum.put(item.getValue(), String.valueOf(item.getCode()));
        });
        map.put(SELECT_TITLE, operatorTypeEnum);
    }

    private Integer code;
    private String value;

    OperatorTypeEnum(Integer code, String name) {
        this.code = code;
        this.value = name;
    }

}
